package com.sumapay.fsb.gensrc.controller;


import com.sumapay.fsb.common.util.CommonUtil;
import com.sumapay.fsb.gensrc.service.IFsbBankCardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.servlet.ServletRequest;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author suma
 * @since 2021-03-16
 */
@RestController
@RequestMapping("/card")
public class FsbBankCardController {
    @RequestMapping("getUserCard")
    public String getUserCard(ServletRequest servletRequest){
        Map<String,Object> requestMap = CommonUtil.paramConvertToSourceMap(servletRequest);
        return iFsbBankCardService.getUserCard(requestMap);
    }
    @RequestMapping("bindCard")
    public String bindCard(ServletRequest servletRequest){
        Map<String,Object> requestMap = CommonUtil.paramConvertToSourceMap(servletRequest);
        return iFsbBankCardService.bindUserCard(requestMap);
    }
    @RequestMapping("cardBin")
    public String cardBin(ServletRequest servletRequest){
        Map<String,Object> requesctMap = CommonUtil.paramConvertToSourceMap(servletRequest);
        String str = iFsbBankCardService.getCardBin("6210810730031110936");
        return str;
    }



    private IFsbBankCardService iFsbBankCardService;
    @Autowired
    public void setiFsbBankCardService(IFsbBankCardService iFsbBankCardService){
        this.iFsbBankCardService = iFsbBankCardService;
    }
}
